import { useUrlQueryParam } from "../../utils/url";
import { useMemo } from "react";

// 项目列表搜索占位符
export const useProjectsSearchParam = () => {
  const [param, setParam] = useUrlQueryParam(['name', 'personId'])
  return [
    useMemo(() => ({...param, personId: Number(param.personId) || undefined}), [param]),
    setParam
  ] as const
}
